package org.jeecg.modules.tplus.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.jeecg.common.aspect.annotation.FieldName;

import java.math.BigDecimal;
import java.util.List;

/**
 * 存货信息
 *
 * @author hzq
 */
@Data
public class InventoryQueryRepDto {

    /**
     * 存货编码
     */
    @Schema(description = "存货编码")
    @JsonProperty(value = "Code")
    @FieldName(name = "存货编码", value = "code")
    private String code;

    /**
     * 存货名称
     */
    @Schema(description = "存货名称")
    @JsonProperty(value = "Name")
    @FieldName(name = "存货名称", value = "name")
    private String name;

    /**
     * 英文名称
     */
    @Schema(description = "英文名称")
    @JsonProperty(value = "Specification")
    @FieldName(name = "英文名称", value = "specification")
    private String specification;

    /**
     * 计价方式
     */
    @Schema(description = "计价方式")
    @JsonProperty(value = "ValueType")
    @FieldName(name = "计价方式", value = "valueType.code")
    private ValueType valueType;

    @Data
    public static class ValueType {
        /**
         * 编码
         */
        @Schema(description = "编码")
        @JsonProperty(value = "Code")
        private String code;
    }

    /**
     * 中文简称
     */
    @Schema(description = "中文简称")
    @JsonProperty(value = "priuserdefnvc1")
    @FieldName(name = "中文简称", value = "priuserdefnvc1")
    private String priuserdefnvc1;

    /**
     * 英文简称
     */
    @Schema(description = "英文简称")
    @JsonProperty(value = "priuserdefnvc2")
    @FieldName(name = "英文简称", value = "priuserdefnvc2")
    private String priuserdefnvc2;

    /**
     * 二级分类
     */
    @Schema(description = "二级分类")
    @JsonProperty(value = "priuserdefnvc3")
    @FieldName(name = "二级分类", value = "priuserdefnvc3")
    private String priuserdefnvc3;

    /**
     * 包装
     */
    @Schema(description = "包装")
    @JsonProperty(value = "priuserdefnvc4")
    @FieldName(name = "包装", value = "priuserdefnvc4")
    private String priuserdefnvc4;

    /**
     * 含电或含液
     */
    @Schema(description = "含电或含液")
    @JsonProperty(value = "Priuserdefnvc5")
    @FieldName(name = "含电或含液", value = "priuserdefnvc5")
    private String priuserdefnvc5;

    /**
     * 适配品牌
     */
    @Schema(description = "适配品牌")
    @JsonProperty(value = "Priuserdefnvc6")
    @FieldName(name = "适配品牌", value = "priuserdefnvc6")
    private String priuserdefnvc6;

    /**
     * 型号
     */
    @Schema(description = "型号")
    @JsonProperty(value = "Priuserdefnvc7")
    @FieldName(name = "型号", value = "priuserdefnvc7")
    private String priuserdefnvc7;

    /**
     * 性质
     */
    @Schema(description = "性质")
    @JsonProperty(value = "priuserdefnvc8")
    @FieldName(name = "性质", value = "priuserdefnvc8")
    private String priuserdefnvc8;

    /**
     * 质量
     */
    @Schema(description = "质量")
    @JsonProperty(value = "priuserdefnvc9")
    @FieldName(name = "质量", value = "priuserdefnvc9")
    private String priuserdefnvc9;

    /**
     * 材质/细分品牌
     */
    @Schema(description = "材质/细分品牌")
    @JsonProperty(value = "priuserdefnvc10")
    @FieldName(name = "材质/细分品牌", value = "priuserdefnvc10")
    private String priuserdefnvc10;

    /**
     * 供应情况
     */
    @Schema(description = "供应情况")
    @JsonProperty(value = "priuserdefnvc11")
    @FieldName(name = "供应情况", value = "priuserdefnvc11")
    private String priuserdefnvc11;

    /**
     * 标签型号
     */
    @Schema(description = "标签型号")
    @JsonProperty(value = "priuserdefnvc12")
    @FieldName(name = "标签型号", value = "priuserdefnvc12")
    private String priuserdefnvc12;

    /**
     * 标签质量
     */
    @Schema(description = "标签质量")
    @JsonProperty(value = "priuserdefnvc18")
    @FieldName(name = "标签质量", value = "priuserdefnvc18")
    private String priuserdefnvc18;

    /**
     * 大陆成本
     */
    @Schema(description = "大陆成本")
    @JsonProperty(value = "priuserdefdecm1")
    @FieldName(name = "大陆成本", value = "priuserdefdecm1")
    private BigDecimal priuserdefdecm1;

    /**
     * 香港成本
     */
    @Schema(description = "香港成本")
    @JsonProperty(value = "priuserdefdecm2")
    @FieldName(name = "香港成本", value = "priuserdefdecm2")
    private BigDecimal priuserdefdecm2;

    /**
     * 香港利润率
     */
    @Schema(description = "香港利润率")
    @JsonProperty(value = "priuserdefdecm4")
    @FieldName(name = "香港利润率", value = "priuserdefdecm4")
    private BigDecimal priuserdefdecm4;

    /**
     * 大陆利润率
     */
    @Schema(description = "大陆利润率")
    @JsonProperty(value = "priuserdefdecm5")
    @FieldName(name = "大陆利润率", value = "priuserdefdecm5")
    private BigDecimal priuserdefdecm5;

    /**
     * 产品实际重量
     */
    @Schema(description = "产品实际重量")
    @JsonProperty(value = "Priuserdefdecm6")
    @FieldName(name = "产品实际重量", value = "priuserdefdecm6")
    private BigDecimal priuserdefdecm6;

    /**
     * 产品体积重量
     */
    @Schema(description = "产品体积重量")
    @JsonProperty(value = "priuserdefdecm7")
    @FieldName(name = "产品体积重量", value = "priuserdefdecm7")
    private BigDecimal priuserdefdecm7;

    /**
     * 计量单位
     */
    @Schema(description = "计量单位")
    @JsonProperty(value = "Unit")
    @FieldName(name = "计量单位", value = "unit")
    private Unit unit;

    /**
     * 主计量单位编码
     */
    @Schema(description = "主计量单位编码")
    @JsonProperty(value = "BaseUnitCode")
    @FieldName(name = "主计量单位编码", value = "baseUnitCode")
    private String baseUnitCode;

    /**
     * 主计量单位名称
     */
    @Schema(description = "主计量单位名称")
    @JsonProperty(value = "BaseUnitName")
    @FieldName(name = "主计量单位名称", value = "baseUnitName")
    private String baseUnitName;

    @Data
    public static class Unit {
        /**
         * 计量单位编码
         */
        @Schema(description = "计量单位编码")
        @JsonProperty(value = "Code")
        private String code;

        /**
         * 计量单位名称
         */
        @Schema(description = "计量单位名称")
        @JsonProperty(value = "Name")
        private String name;
    }

    /**
     * 存货属性：电商
     */
    @Schema(description = "存货属性：电商")
    @JsonProperty(value = "IsEshop")
    @FieldName(name = "计量单位", value = "isEshop")
    private String isEshop;

    /**
     * 存货属性：外购属性
     */
    @Schema(description = "存货属性：外购属性 ")
    @JsonProperty(value = "IsPurchase")
    @FieldName(name = "存货属性：外购属性 ", value = "isPurchase")
    private String isPurchase;

    /**
     * 是否具有销售属性
     */
    @Schema(description = "是否具有销售属性")
    @JsonProperty(value = "IsSale")
    @FieldName(name = "是否具有销售属性", value = "isSale")
    private String isSale;

    /**
     * 是否具有自制属性
     */
    @Schema(description = "是否具有自制属性")
    @JsonProperty(value = "IsMadeSelf")
    @FieldName(name = "是否具有自制属性", value = "isMadeSelf")
    private String isMadeSelf;

    /**
     * 是否生产耗用
     */
    @Schema(description = "是否生产耗用")
    @JsonProperty(value = "IsMaterial")
    @FieldName(name = "是否生产耗用", value = "isMaterial")
    private String isMaterial;

    /**
     * 是否具有劳务属性
     */
    @Schema(description = "是否具有劳务属性")
    @JsonProperty(value = "IsLaborCost")
    @FieldName(name = "是否具有劳务属性", value = "isLaborCost")
    private String isLaborCost;

    /**
     * 是否具有委外属性
     */
    @Schema(description = "是否具有委外属性")
    @JsonProperty(value = "IsMadeRequest")
    @FieldName(name = "是否具有委外属性", value = "isMadeRequest")
    private String isMadeRequest;

    /**
     * 存货描述
     */
    @Schema(description = "存货描述")
    @JsonProperty(value = "InventoryDescript")
    @FieldName(name = "存货描述", value = "inventoryDescript")
    private String inventoryDescript;

    /**
     * 所属类别
     */
    @Schema(description = "所属类别")
    @JsonProperty(value = "InventoryClass")
    @FieldName(name = "所属类别", value = "inventoryClass.code")
    private InventoryClass inventoryClass;

    /**
     * 品牌
     */
    @Schema(description = "品牌")
    @JsonProperty(value = "ProductInfo")
    @FieldName(name = "品牌", value = "productInfo.code")
    private ProductInfo productInfo;

    @Data
    public static class ProductInfo {
        /**
         * 编码
         */
        @Schema(description = "编码")
        @JsonProperty(value = "Code")
        private String code;

        /**
         * 名称
         */
        @Schema(description = "名称")
        @JsonProperty(value = "Name")
        private String name;
    }

    @Data
    public static class InventoryClass {
        /**
         * 所属类别编码
         */
        @Schema(description = "所属类别编码")
        @JsonProperty(value = "Code")
        private String code;

        /**
         * 所属类别名称
         */
        @Schema(description = "所属类别名称")
        @JsonProperty(value = "Name")
        private String name;
    }

    /**
     * 动态属性，包括自定义项和自由项
     */
    @Schema(description = "动态属性，包括自定义项和自由项")
    @JsonProperty(value = "DynamicPropertyKeys")
    private Object[] dynamicPropertyKeys;

    /**
     * 动态属性的值，对应DynamicPropertyKeys
     */
    @Schema(description = "动态属性的值，对应DynamicPropertyKeys")
    @JsonProperty(value = "DynamicPropertyValues")
    private Object[] dynamicPropertyValues;

    /**
     * 助记码
     */
    @Schema(description = "助记码")
    @JsonProperty(value = "Shorthand")
    @FieldName(name = "助记码", value = "shorthand")
    private String shorthand;

    /**
     * 是否停用
     */
    @Schema(description = "是否停用")
    @JsonProperty(value = "Disabled")
    @FieldName(name = "记录数", value = "disabled")
    private String disabled;

    /**
     * 默认仓库
     */
    @Schema(description = "默认仓库")
    @JsonProperty(value = "warehouse")
    @FieldName(name = "默认仓库", value = "warehouse")
    private Warehouse warehouse;

    @Data
    public static class Warehouse {

        /**
         * 仓库编码
         */
        @Schema(description = "仓库编码")
        @JsonProperty(value = "Code")
        private String Code;

        /**
         * 仓库名称
         */
        @Schema(description = "仓库名称")
        @JsonProperty(value = "Name")
        private String Name;
    }

    /**
     * 默认货位
     */
    @Schema(description = "默认货位")
    @JsonProperty(value = "invlocation")
    @FieldName(name = "默认货位", value = "InvLocation")
    private InvLocation invlocation;

    @Data
    public static class InvLocation {

        /**
         * 编码
         */
        @Schema(description = "编码")
        @JsonProperty(value = "Code")
        private String Code;

        /**
         * 名称
         */
        @Schema(description = "名称")
        @JsonProperty(value = "Name")
        private String Name;
    }

    /**
     * 默认供应商
     */
    @Schema(description = "默认供应商")
    @JsonProperty(value = "partner")
    @FieldName(name = "默认供应商", value = "partner")
    private Partner partner;

    @Data
    public static class Partner {

        /**
         * 编码
         */
        @Schema(description = "编码")
        @JsonProperty(value = "Code")
        private String Code;

        /**
         * 名称
         */
        @Schema(description = "名称")
        @JsonProperty(value = "Name")
        private String Name;
    }

    /**
     * oss图片列表
     */
    @Schema(description = "oss图片列表")
    @JsonProperty(value = "OssImageList")
    @FieldName(name = "记录数", value = "OssImageList")
    private List<OssImageList> OssImageList;

    @Data
    public static class OssImageList {
        /**
         * 图片url
         */
        @Schema(description = "图片url")
        @JsonProperty(value = "ImageUrl")
        @FieldName(name = "图片url", value = "ImageUrl")
        private String imageUrl;
    }

}
